package com.innjia.utils;

import org.apache.commons.lang3.StringUtils;


public class AntianaphylaxisUtils {
	
	/**
	 * 转换手机号：
	 * 15888888888-->158****8888
	 * @param phone
	 * @return
	 */
	public static String transferPhone(String phone) {
		if(StringUtils.isBlank(phone)) {
			return phone;
		}
		if(11 != phone.length()) {
			return phone;
		}
		String newPhone = "";
		for (int i = 0; i < phone.length(); i++) {
			if(i > 3 && i < 8) {
				newPhone += "*";
			}else {
				newPhone += phone.charAt(i);
			}
		}
		return newPhone;
	}
	

	
}
